package com.example.himalayaproject.activity;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.KeyEvent;
import android.view.View;
import android.widget.ImageView;

import com.example.himalayaproject.R;

public class OwnerLoginActivity extends AppCompatActivity implements View.OnClickListener {
    private ImageView back_iv;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_owner_login);
        aboutLister();
    }

    private void aboutLister() {
        back_iv = (ImageView) findViewById(R.id.owner_login_back_iv);
        back_iv.setOnClickListener(this);
    }

    @Override
    public boolean onKeyDown(int keyCode, KeyEvent event) {
        if ((keyCode == KeyEvent.KEYCODE_BACK)) {
            finish();
            overridePendingTransition(R.anim.anim_enter, R.anim.back_enter);
            return false;
        } else {
            return super.onKeyDown(keyCode, event);
        }
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.owner_login_back_iv:
                finish();
                break;
        }
    }
}
